<section class="content-header" >
    <h1>
        充值管理
        <small>会员充值管理</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="{:U('Admin/index')}"><i class="fa fa-home"></i>首页</a></li>
        <li class="active">会员充值管理</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <div class="box-title">
                        <label >
                            会员充值管理
                        </label>
                    </div>
                    <div class="pull-right">
                       
                    </div>
                </div><!-- /.box-header -->
                <div class="box-body">
                    <table id="table" class="table table-bordered table-striped" width="100%">
                        <thead>
                            <tr>
                                <th>交易号</th>
                                <th>会员</th>
                                <th>充值金额</th>
                                <th>充值时间</th>
                                <th>类型</th>
                            </tr>
                        </thead>
                    </table>
                </div><!-- /.box-body -->
            </div><!-- /.box -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</section><!-- /.content -->
<!-- DATA TABES SCRIPT -->

<!-- page script -->
<script type="text/javascript">
    $(function () {
        $('#table').dataTable({
            "autoWidth": true,
            "searching": false,
            "ordering": false,
            "processing": true, //载入数据的时候是否显示“载入中”
//            ordering: false, //排序操作在服务端进行，所以可以关了。
            'serverSide': true,
            "ajax": "{:U('Member/chargePager')}",
            "columns": [
                {"data": "chargeno"},
                {"data": "member"},
                {"data": "price"},
                {"data": "chargetime"},
                {"data": "cardname"}
            ],
            "columnDefs": [
                {
                    "targets": 1,
                    "render": function (data, type, row) {
                        return data+"&nbsp;&nbsp;("+row.nickname+")";
                    }
                },
                {
                    "render": function (data, type, row) {
                        return new Date(parseInt(data) * 1000).toLocaleString();
                    },
                    "targets": 3
                }
            ],
            "language": lang
        });
    });
   
</script>